<?php
// $Id: views-ui-edit-item.tpl.php,v 1.9 2008/08/08 16:57:44 merlinofchaos Exp $
/**
 * @file views-ui-edit-item.tpl.php
 *
 * This template handles the printing of fields/filters/sort criteria/arguments or relationships.
 */
?>
<?php print $add; ?>
<div class="mewdkp-section-title<?php
  if ($overridden) {
    print ' overridden';
  }
  if ($defaulted) {
    print ' defaulted';
  }
  ?>">
  <?php print $item_help_icon; ?>
  <?php print $title; ?>
</div>

<div class="mewdkp-section-content<?php
  if ($overridden) {
    print ' overridden';
  }
  if ($defaulted) {
    print ' defaulted';
  }
  ?>">
  <?php if (empty($drops)): ?>
    <div><?php print t('There are no drops listed for this kill.'); ?></div>
  <?php else: ?>
  	<table>
    	<thead>
      	<tr><th width="55%">Item</th><th>Winner</th><th>Price</th><th width="8%">&nbsp;</th></tr>
      </thead>
      <tbody>
				<?php foreach ($drops as $index => $drop): ?>
          <tr class="<?php if ($drop['changed']) { print 'changed'; }?>">
            <td><?php print $drop['wowhead_icon'] . '&nbsp;' . $drop['link']?></td>
            <td><?php print $drop['winner']['icon']; print $drop['winner']['link']?></td>
            <td><?php print ($drop['disenchanted'])?('Disenchanted'):($drop['price'])?></td>
            <td><?php print $drop['edit']?></td>        
          </tr>
        <?php endforeach; ?>
      </tbody>
    </table>
  <?php endif; ?>
</div>
